
#include	<string.h>
#include	<unistd.h>
#include	<stdlib.h>
#include	<sys/types.h>
#include	<sys/stat.h>
#include	<fcntl.h>

int		main(int ac, char **av)
{
  int		error;
  int		fd;

  fd = open("toto", O_RDWR);
  error = dup2(fd, 1);
  if (error == -1)
    {
      write(2, "Dup2 failed\n", strlen("Dup2 failed\n"));
      exit(EXIT_FAILURE);
    }
  write(1, "Salutatilol\n", 11);
  return (EXIT_SUCCESS);
}
